package cn.uestc.labhms.modules.hms.entity.Vo;

import cn.uestc.labhms.modules.hms.param.ValidateConst;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class RevisePasswordVo {
    @Email(message = "email格式不正确")
    private String email;
    @NotNull(message = "code不能为空")
    private String captcha;
    @Length(min = 6, max = 20, message = ValidateConst.PASSWORD_ERROR_MSG)
    @Pattern(regexp = ValidateConst.PASSWORD_REGEX, message = ValidateConst.PASSWORD_ERROR_MSG)
    private String password;
}
